#ifndef __IOPFSFILEATTACHED_H__
#define __IOPFSFILEATTACHED_H__

#include "IOPFSFileDisk.h"

class CIOPFSFileAttached : public CIOPFSFileDisk
{
private:
	std::vector<u8>	DataBuffer;
	u32 IndexFile;
	u32 ActualFile;
public:
	CIOPFSFileAttached(stringc dir,stringc filename,CFileSystem *fsp);
	virtual ~CIOPFSFileAttached();

	virtual bool OpenFileForWriting(stringc Name);
	virtual u32 WriteBinary(void *Buffer,u32 Size);
	virtual bool CloseFile();

	virtual s32 FRead(void *Buffer,u32 Size,void *BufferFrom);
	virtual s32 FClose(void *BufferToClose);
	virtual s32 FSeek(void *Buffer,u32 PositionToSeek);
	virtual void *FOpenReadBinary(stringc FileToOpen);

	bool GetAttachedFile(stringc FileName,u32 *Result);
};

#endif
